<template>
    <div class="ADorganization">
        <cjcNav title="组织机构" @customRouter="customRouter"/>
        <pullRefresh :pullrefesh="false">
            <div class="organization">
                <Row class="top" type="flex" align="middle">
                    <Col span=3 offset=1>
                        <div class="logo">
                            <img src="static/Administrator/logo.png">
                        </div>
                    </Col>
                    <Col span=20 class="text">
                        西南财经大学天府学院
                    </Col>
                </Row>
                <!-- 组织结构 -->
                <Row class="top" type="flex" align="middle" 
                v-for="item in this.$store.state.AllDept"
                :key="item.DWH"
                @click.native="toLink('ADorganizationScend', item)">
                    <Col span=2 offset=2>
                        <div class="logo-op">
                            <img src="static/Administrator/lianxi.png">
                        </div>
                    </Col>
                    <Col span=20 class="text">
                        {{item.DWMC}}
                    </Col>
                </Row>
            </div>
        </pullRefresh>
    </div>
</template>

<script>
export default {
    components: {
        cjcNav: () => import('@/components/common/Nav.vue'),
        pullRefresh: () => import('@/components/common/pullRefresh.vue')
    },
    methods: {
        customRouter() {
            this.$router.push({
                name: 'AdDetails'
            })
        },
        toLink(link, params) {
            this.$router.push({
                name: link,
                params: {
                    DWH: params.DWH,
                    DWMC: params.DWMC
                }
            })
        }
    }
}
</script>

<style lang="less">
.ADorganization{
    height: 100%;
    .organization{
        .top{
            .logo{
                width: 30px;
                img{
                    width: 100%;
                }
            }
            .logo-op{
                width: 12px;
                img{
                    width: 100%;
                }
            }
        }
        .text{
            height: 100%;
            padding: 10px 0;
            font-size: 15px;
            font-weight: bolder;
            line-height: 30px;
            border-bottom: 1px solid #eaeaea;
        }
    }
}
</style>
